﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="dialog_stoneorderline.aspx.cs" Inherits="DTcms.Web.admin.dialog.dialog_stoneorderline" ValidateRequest="false" %>
<%@ Import namespace="DTcms.Common" %>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>添加修改订单明细窗口</title>
<link href="../skin/default/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="../../scripts/jquery/jquery-1.11.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="../../scripts/jquery/PCASClass.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/common.js"></script>
<script type="text/javascript">
    var api = top.dialog.get(window); //获取窗体对象
    var W = api.data;
    //页面加载完成执行
    $(function () {
        //设置按钮及事件
        api.button([{
            value: '确定',
            callback: function () {
                submitForm();
            },
            autofocus: true
        }, {
            value: '取消',
            callback: function () { }
        }]);

        $("#txtorder_no").val($("#txtorderNo", W.document).val());
        console.log("11", '<%=lineid%>');
      
    });

    //提交表单处理
    function submitForm() {
        var currDocument = $(document); //当前文档
        //验证表单
        if ($("#txtgoods_no").val() == "") {
            top.dialog({
                title: '提示',
                content: '请填写产品编号！',
                okValue: '确定',
                ok: function () { },
                onclose: function () {
                    $("#txtgoods_no", currDocument).focus();
                }
            }).showModal(api);
            return false;
        }
        if ($("#txtgoods_title").val() == "") {
            top.dialog({
                title: '提示',
                content: '请填写产品名称！',
                okValue: '确定',
                ok: function () { },
                onclose: function () {
                    $("#txtgoods_title", currDocument).focus();
                }
            }).showModal(api);
            return false;
        }
        if ($("#txtgoods_price").val() == "") {
            top.dialog({
                title: '提示',
                content: '请填写市场价格！',
                okValue: '确定',
                ok: function () { },
                onclose: function () {
                    $("#txtgoods_price", currDocument).focus();
                }
            }).showModal(api);
            return false;
        }
        if ($("#txtreal_price").val() == "") {
            top.dialog({
                title: '提示',
                content: '请填写真实价格！',
                okValue: '确定',
                ok: function () { },
                onclose: function () {
                    $("#txtreal_price", currDocument).focus();
                }
            }).showModal(api);
            return false;
        }
        if ($("#txtquantity").val() == "" ) {
            top.dialog({
                title: '提示',
                content: '请填写数量！',
                okValue: '确定',
                ok: function () { },
                onclose: function () {
                    $("#txtquantity", currDocument).focus();
                }
            }).showModal(api);
            return false;
        }
        //下一步，AJAX提交表单
        var postData = {
            "order_no": $("#txtorderNo", W.document).val(),
             "lingid":'<%=lineid%>',
            "goods_no": $("#txtgoods_no").val(),
            "goods_title": $("#txtgoods_title").val(),
            "img_url": $("#txtimg_url").val(),
            "goods_price": $("#txtgoods_price").val(),
            "real_price": $("#txtreal_price").val(),
            "quantity": $("#txtquantity").val(),
            "unit": $("#txtunit").val(),
            "Long": $("#txtlong").val(),
            "wide": $("#txtwide").val(),
            "high": $("#txthigh").val(),
            "model": $("#txtmodel").val(),
            "thickness": $("#txtthickness").val(),
            "square": $("#txtsquare").val(),
            "express_fee": $("#txtexpress_fee").val()
        };
        //发送AJAX请求
        W.sendAjaxUrl(api, postData, "../../tools/admin_ajax.ashx?action=add_stoneorderline");
        return false;
    }

</script>
    <style>
        html{overflow-x:hidden;overflow-y:auto;}
        .half11{ width:50%; float:left;}
    </style>
</head>

<body >
<div class="div-content" style="height:450px; overflow:auto">
     <dl>
      <dt>订单编号</dt>
      <dd><input type="text" id="txtorder_no" class="input txt" readonly /> </dd>
    </dl>
    <dl>
      <dt>产品编号</dt>
      <dd><input type="text" id="txtgoods_no" class="input txt" value="<%=line[0] %>" /> <span class="Validform_checktip">*</span></dd>
    </dl>
     <dl>
      <dt>产品名称</dt>
      <dd><input type="text" id="txtgoods_title" class="input txt"  value="<%=line[1] %>"  /> <span class="Validform_checktip">*</span></dd>
    </dl>
     <dl style="display:none;">
      <dt>产品图片</dt>
      <dd><input type="text" id="txtimg_url" class="input txt"  value="<%=line[2] %>"  /> <span class="Validform_checktip">*</span></dd>
    </dl>
     <dl>
      <dt>市场价格</dt>
      <dd><input type="text" id="txtgoods_price" class="input txt"  value="<%=line[3] %>"  /> <span class="Validform_checktip">*</span></dd>
    </dl>
    <dl>
      <dt>真实价格</dt>
      <dd><input type="text" id="txtreal_price" class="input txt"  value="<%=line[4] %>"  /> <span class="Validform_checktip">*</span></dd>
    </dl>
    <dl>
      <dt>数量</dt>
      <dd><input type="text" id="txtquantity" class="input txt"  value="<%=line[5] %>"  /> <span class="Validform_checktip">*</span></dd>
    </dl>
    <dl class="half">
      <dt>单位</dt>
      <dd><input type="text" id="txtunit" class="input txt"  value="<%=line[6] %>"  /> <span class="Validform_checktip">*</span></dd>
    </dl>
    <dl  class="half">
      <dt>长</dt>
      <dd><input type="text" id="txtlong" class="input txt"  value="<%=line[7] %>"  /> <span class="Validform_checktip">*</span></dd>
    </dl>
    <dl  class="half">
      <dt>宽</dt>
      <dd><input type="text" id="txtwide" class="input txt"  value="<%=line[8] %>"  /> <span class="Validform_checktip">*</span></dd>
    </dl>
    <dl  class="half">
      <dt>高</dt>
      <dd><input type="text" id="txthigh" class="input txt"  value="<%=line[9] %>"  /> <span class="Validform_checktip">*</span></dd>
    </dl>
    <dl  class="half">
      <dt>规格型号</dt>
      <dd><input type="text" id="txtmodel" class="input txt"  value="<%=line[10] %>"  /> <span class="Validform_checktip">*</span></dd>
    </dl>
    <dl  class="half">
      <dt>厚度</dt>
      <dd><input type="text" id="txtthickness" class="input txt"  value="<%=line[11] %>"  /> <span class="Validform_checktip">*</span></dd>
    </dl>
    <dl  class="half">
      <dt>平方</dt>
      <dd><input type="text" id="txtsquare" class="input txt"  value="<%=line[12] %>"  /> <span class="Validform_checktip">*</span></dd>
    </dl>
    <dl  class="half">
      <dt>单项运费</dt>
      <dd><input type="text" id="txtexpress_fee" class="input txt"  value="<%=line[13] %>"  /> <span class="Validform_checktip">*</span></dd>
    </dl>
   <br /><br />
</div>
</body>
</html>